package com.moco.launcher;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.util.Log;

import com.oazon.common.Logger;
import com.oazon.moco.link.core.LinkSDK;
import com.oazon.moco.link.core.source.LanEventSource;
import com.oazon.moco.link.core.source.LinkEventSource;
import com.oazon.moco.link.core.source.SystemEventSource;

/**
 * Created by win 7 on 2015/6/16.
 */
public class UpdateReceiver extends BroadcastReceiver {
    public static final String ACTION_UPDATE_START = "com.moco.update.start";
    private static final String ACTION_UPDATE_END = "com.moco.update.end";
    @Override
    public void onReceive(Context context, Intent intent) {
        if (intent.getAction().equals(ACTION_UPDATE_START)) {
        	Logger.d("wwww", ACTION_UPDATE_START);
            LinkSDK.getInstance().updateStart(new SystemEventSource());

        } else if(intent.getAction().equals(ACTION_UPDATE_END)) {
            LinkSDK.getInstance().updateEnd(new SystemEventSource());
        }
    }
}
